import { ref } from 'vue'

export function useScreenShare() {
  const sharing = ref(false)
  const screenStream = ref<MediaStream|null>(null)

  async function startScreenShare() {
    sharing.value = true
    // TODO: 调用getDisplayMedia获取屏幕流
  }

  function stopScreenShare() {
    sharing.value = false
    // TODO: 停止屏幕共享
  }

  return {
    sharing,
    screenStream,
    startScreenShare,
    stopScreenShare
  }
}